home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / tools / 21help.com / 21H1.TXT < prev    next >
Encoding:
Text File  |  1988-11-13  |  47.2 KB  |  1,026 lines

  1. FUNCTION:      25H      SET INTERRUPT VECTOR
  2.  
  3. DESCRIPTION:   Changes a specified interrupt vector to point to another 
  4.                interrupt handling routine; before calling this function, call 
  5.                function 35H to get the present vector and save it; restore 
  6.                that vector using this function when your program ends; not 
  7.                required for INTs 22H, 23H and 24H which are automatically 
  8.                restored by MS-DOS.
  9.                 
  10. CALL:          AH = 25H
  11.                AL = interrupt number
  12.                DS:DX = Segment:Offset of new interrupt handling routine
  13.  
  14. RETURNS:       Nothing
  15.  
  16. SEE ALSO:      Function 35H$
  17. FUNCTION:      26H      CREATE PROGRAM SEGMENT PREFIX
  18.  
  19. DESCRIPTION:   Copies the program segment prefix (PSP) of the current program 
  20.                to a specified segment in memory and updates the new PSP to 
  21.                make it usable by another program; the need for this function 
  22.                was obviated by function 4BH (Execute Program) for MS-DOS 2.0 
  23.                and later. 
  24.  
  25. CALL:          AH = 26H
  26.                DX = Segment of new PSP
  27.  
  28. RETURNS:       Nothing
  29.  
  30. SEE ALSO:      Function 4BH$
  31. FUNCTION:      30H      GET MS-DOS VERSION NUMBER
  32.  
  33. DESCRIPTION:   Returns the version number of the installed MS-DOS operating 
  34.                system; if 0 returned in AL, MS-DOS version 1 is installed; if
  35.                this is unacceptable to the program, care must be taken to 
  36.                terminate the program using function calls consistent with this 
  37.                version - INT 20H or function 0 of INT 21H.
  38.  
  39. CALL:          AH = 30H
  40.  
  41. RETURNS:       AL = major version number (e.g. Version 3.1 returns 3 in AL)
  42.                AH = minor version number (e.g. Version 3.1 returns 0AH in AH)$
  43. FUNCTION:      33H      GET OR SET CTL-BREAK FLAG
  44.  
  45. DESCRIPTION:   Returns or sets the state of the system's Ctl-Break or Ctl-C 
  46.                checking flag; this flag is system-wide, so before changing it
  47.                the current state should be returned, saved and then restored 
  48.                when the program is terminated; function can be used to prevent 
  49.                user breaks into critical parts of a program.
  50.  
  51. CALL:          AH = 33H
  52.                if getting the flag
  53.                         AL = 0
  54.                is setting the flag
  55.                         AL = 01
  56.                         DL = 00    to toggle Ctl-Break checking off
  57.                         DL = 01    to toggle, Ctl-Break checking on
  58.  
  59. RETURNS:       if getting the flag
  60.                         DL = 00      if Ctl-Break checking is off
  61.                              01      if Ctl-Break checking is on
  62.  
  63.                if setting the flag   Nothing$
  64. FUNCTION:      35H      GET INTERRUPT VECTOR
  65.  
  66. DESCRIPTION:   Returns the address of the current interrupt handler for a 
  67.                specified interrupt; generally used prior to function 25H call 
  68.                to get and save the current handler address.
  69.  
  70. CALL:          AH = 35H
  71.                AL = interrupt number
  72.  
  73. RETURNS:       ES:BX = Segment:Offset of current interrupt handling routine
  74.  
  75. SEE ALSO:      Function 25H$
  76. FUNCTION:      38H      GET OR SET COUNTRY
  77.  
  78. DESCRIPTION:   Returns or sets country code; see reference book for futher 
  79.                information.$
  80. FUNCTION:      44H      DEVICE DRIVER CONTROL  (IOCTL)
  81.  
  82. DESCRIPTION: Passes information between a program and a device driver; see a
  83.              manual for more complete information.
  84. CALL:        AH = 44H
  85.              AL = 00 get driver control data   
  86.                 = 01 set driver control data
  87.                 = 02 read from device control channel to buffer (character)
  88.                 = 03 write from buffer to device control channel (character)
  89.                 = 04 same as 02, but use drive number in BL (block)
  90.                 = 05 same as 03, but use drive number in BL (block)
  91.                 = 06 get input status
  92.                 = 07 get output status
  93.                 = 08 test if block device has changeable media (eg floppy)
  94.                 = 09 network call to test if device is local or remote
  95.                 = 0Ah network call to test whether handle is remote or local
  96.                 = 0BH network call to change sharing retry count and delay
  97.              BX = handle for codes 00, 01, 02, 03, 06, 07 or 0AH
  98.                 = number of retries for code 0BH      
  99.              BL = drive code (0=default, 1=A, etc) for codes 04, 05, 08 or 09
  100.              CX = number of bytes to read or write for codes 02, 03, 04 or 05
  101.                 = delay between retries for code 0BH
  102.              DS:DX = Segment:Offset of buffer for codes 02 through 05
  103.  
  104.  ANY KEY FOR MORE              <F1> - PRIOR MENU                <ESC> TO EXIT@
  105. CALL:(contd) DX = device data word for code 01 (set DH=0 when calling)
  106.  
  107.                     DX BIT MAPPING FOR CODES 00 AND 01
  108.  BIT       VALUE       FOR CHARACTER DEVICE              FOR DISK FILE 
  109.  15          0         Reserved                          Reserved 
  110.  14(Rd Only) 1         if can process control strings    Reserved 
  111.                        sent with code 02 and 03
  112.  8 - 13                Reserved                          Reserved
  113.  7           1 / 0     handle refers to a device    /    refers to disk file
  114.  6           0 / 0     if end of file on input     /     file has been written
  115.  5           1         does not recognize ^P, ^C, ^Q, ^S | bits 0 - 5 represent
  116.              0         recognizes above control chars    | drive number
  117.  4                     Reserved                          | 0 = A, 1 = B, etc.
  118.  3           1         if CLOCK device                   |
  119.  2           1         if NUL device                     |
  120.  1           1         if console output                 |
  121.  0           1         if console input
  122.  
  123. RETURNS:    if successful
  124.                Carry Flag = Clear
  125.                        AX = number of bytes transferred  if code 02 - 05 called
  126.                        AL = status  if code 06 or 07 called
  127.                           = 0       if not ready
  128.                           = 0FFh    if ready
  129.  ANY KEY FOR MORE    <UP> - PRIOR PAGE    <F1> - PRIOR MENU   <ESC> TO EXIT@
  130.  
  131. RETURNS:(contd)        AX = value  if code 08 called
  132.                           = 0   removable media
  133.                           = 1   fixed media
  134.                        DX = device data word - code 00 (bit mapping above)
  135.  
  136.             if unsuccessful
  137.                Carry Flag = Set
  138.                        AX = error code
  139.                             1     if invalid function number
  140.                             4     if invalid handle
  141.                             5     if access denied
  142.                             6     if invalid handle or not open
  143.                           0DH     if invalid data
  144.                           0FH     if invalid drive number
  145.  
  146.         <F1> - PRIOR MENU        <UP> FOR PRIOR PAGE        <ESC> TO EXIT$
  147. FUNCTION:      4BH      EXECUTE PROGRAM
  148.  
  149. DESCRIPTION:   Loads and executes a specified program (child) from within 
  150.                another program (parent); when child terminates, control is 
  151.                passed back to parent; child's return code can be accessed 
  152.                using function 4DH; sufficient memory must be made available by 
  153.                the parent to satisfy the child's requirements; all registers 
  154.                except CS:IP are destroyed, so SS:SP must be saved and then 
  155.                restored by the parent; child inherits all open handles of the 
  156.                parent; certain information must be passed to child by means of 
  157.                a parameter block; can be used to 'shell out' by spawning 
  158.                another copy of COMMAND.COM; can also be used to load an 
  159.                overlay.
  160.                 
  161. CALL:          AH = 4BH
  162.                AL = 00    if loadinng and executing a program
  163.                   = 03    if loading an overlay
  164.                DS:DX = Segment:Offset of ASCIIZ program (overlay) name
  165.  
  166.  
  167.  ANY KEY FOR MORE              <F1> - PRIOR MENU                <ESC> TO EXIT@
  168.  
  169. CALL(contd):   ES:BX = Segment:Offset of program parameter block
  170.                
  171.                               PARAMETER BLOCK MAP   
  172.   BYTE         LOAD AND EXECUTE PROGRAM                   LOAD OVERLAY
  173.   0 - 1        Segment of environemnt passed to child;    Load segment address
  174.                set to 00, to use parent's environment.
  175.   2 - 5        Segment:Offset of command line passed to   Relocation factor for
  176.                child; must have command line length as    .EXE files
  177.                first byte and <CR> as last.
  178.   6 - 9        Segment:Offset of 1st FCB passed to child  Nothing
  179. 0AH - 0DH      Segment:Offset of 2nd FCB passed to child  Nothing
  180.  
  181. RETURNS:       if function successful
  182.                   Carry Flag = Clear
  183.                if function unsuccessful
  184.                   Carry flag = Set
  185.                           AX = error code
  186.                                1      if invalid function
  187.                                2      if file not found or invalid path
  188.                                5      if access denied
  189.                                8      if insufficient memory to load
  190.                              0AH      if invalid environment
  191.                              0BH      if invalid format
  192.         <F1> - PRIOR MENU        <UP> FOR PRIOR PAGE        <ESC> TO EXIT$
  193. FUNCTION:      4DH      GET RETURN CODE
  194.  
  195. DESCRIPTION:   Used by a parent after a successful completion of function 4BH 
  196.                (load and execute a program) to get the return code of the 
  197.                child.
  198.  
  199. CALL:          AH = 4DH
  200.  
  201. RETURNS:       AH = exit type
  202.                          00     if normal termination
  203.                          01     if terminated by Ctl-C
  204.                          02     if terminated by critical error 
  205.                          03     if terminated and stayed resident (function 31H)
  206.                AL = return code (passed by child through function 4CH)$
  207. FUNCTION:      59H  GET EXTENDED ERROR INFORMATION 
  208.  
  209. DESCRIPTION:   Obtains information after unsuccessful INT 21H call 
  210.  
  211. CALL:          AH = 59H  
  212.                BX = 0 
  213.  
  214. RETURNS:       AX = extended error code  (0-no error)
  215. 1-invalid function             2-file not found      3-path not found 
  216. 4-too many open files          5-access denied       6-invalid handle 
  217. 7-MCB destroyed                8-insufficient memory 9-invalid MCB 
  218. 0AH-invalid environment      0BH-invalid format      0CH-invalid access code 
  219. 0DH-invalid data             0EH-RESERVED            0FH-invalid drive 
  220. 10H-remove current directory 11H-not same device     12H-no more files 
  221. 13H-write protected          14H-unknown unit        15H-drive not ready 
  222. 16H-unknown command          17H-CRC error           18H-bad request structure  
  223. 19H-seek error               1AH-unknown medium type 1BH-sector not found 
  224. 1CH-printer out of paper     1DH-write fault         1EH-read fault 
  225. 20H-sharing violation        21H-lock violation      22H-disk change invalid 
  226. 23H-FCB unavailable          24-4FH-RESERVED         50H-file already exists 
  227. 51H-RESERVED                 52H-cannot make directory 53H-fail on INT 24H 
  228.  
  229.                
  230.   ANY KEY FOR MORE             <F1> - PRIOR MENU                 <ESC> TO EXIT@
  231. RETURNS(contd): 
  232.                BH = error class
  233.   1 out of resource                    2 temporary situation
  234.   3 authorization problem              4 internal error in system software
  235.   5 hardware failure                   6 system software failure
  236.   7 application program error          8 file or item not found
  237.   9 file or item in invalid format   0AH file or item iterlocked
  238. 0BH storage medium problem           0CH other error
  239.  
  240.                BL = recommended action
  241.   1 retry reasonable number of tries    2 delay between each retry
  242.   3 get corrected user input            4 abort with clean up
  243.   5 abort with no clean up              6 ignore
  244.   7 retry after user intervention
  245.  
  246.                CH = error locus
  247.   1 unknown                             2 block device
  248.   2 network related                     4 serial device
  249.   5 memory related
  250.  
  251.  
  252.  
  253.         <F1> - PRIOR MENU        <UP> FOR PRIOR PAGE        <ESC> TO EXIT$
  254. FUNCTION:      62H      GET PROGRAM SEGMENT PREFIX ADDRESS  (PSP)
  255.  
  256. DESCRIPTION:   Returns the segment of the PSP for the current program.
  257.  
  258. CALL:          AH = 62H
  259.  
  260. RETURNS:       BX = segment of current program's program segment prefix$
  261. FUNCTION:      29H      PARSE FILENAME
  262.  
  263. DESCRIPTION:   Parses a text string to extract the various fields of a file 
  264.                control block (FCB); for details relating to the performance of 
  265.                this function, see a reference book
  266.  
  267. CALL:          AH = 29H
  268.                AL = flags to control parsing
  269.                DS:SI = Segment:Offset of ASCIIZ text string
  270.                ES:DI = Segment:Offset of unopened file control block
  271.  
  272. RETURNS:       AL = 00      if no wildcards were found
  273.                     01      if wildcards were found
  274.                   0FFH      if drive specifier invalid
  275.                DS:SI = Segment:Offset of first character after parsed filename
  276.                ES:DI = Segment:Offset of formatted unopened file control block$
  277.  
  278. FUNCTION:      53H      SUBFUNCTION 00   GET MACHINE NAME 
  279.                         SUBFUNCTION 02   SET PRINTER SETUP
  280.                         SUBFUNCTION 03   GET PRINTER SETUP
  281.  
  282. DESCRIPTION:   Subfunction 00 returns an ASCIIZ string identifying the local 
  283.                computer; the total string length is 16 bytes long; Microsoft 
  284.                Networks must be running to use this function.      
  285.  
  286. CALL:          AH = 5EH
  287.                AL = 00
  288.                DS:DX = Segment:Offset of buffer to receive string
  289.  
  290. RETURNS:       if successful
  291.                         Carry Flag = Clear
  292.                                 CX = identification number of local computer
  293.                              DS:DX = Segment:Offset of local computer name
  294.                if unsuccessful
  295.                         Carry Flag = Set
  296.                                 AX = error code
  297.                                      1    Networks not running
  298.  
  299.     ANY KEY FOR NEXT SUBFUNCTION     <F1> - PRIOR MENU        <ESC> TO QUIT@
  300.  
  301. DESCRIPTION:   Subfunction 02 specifies a setup string to be sent before any 
  302.                file is sent to a particular networked printer;  allows each 
  303.                user to specify an individualized mode on the same printer; 
  304.                Microsoft Networks must be running to use this function.      
  305.  
  306. CALL:          AH = 5EH
  307.                AL = 02
  308.                BX = printer assign list index (gotten from function 5F02H)
  309.                CX = setup string length
  310.                DS:SI = Segment:Offset of setup string
  311. RETURNS:       if successful
  312.                         Carry Flag = Clear
  313.                if unsuccessful
  314.                         Carry Flag = Set
  315.                                 AX = error code
  316.                                      1       if invalid function call
  317.  
  318.  
  319.  
  320.  ANY KEY FOR MORE    <UP> - PRIOR PAGE     <F1> - PRIOR MENU      <ESC> TO QUIT@
  321.  
  322. DESCRIPTION:   Subfunction 03 returns the current printer setup string from a 
  323.                network printer; Microsoft Networks must be running to use this 
  324.                function.        
  325.  
  326. CALL:          AH = 5EH
  327.                AL = 03
  328.                BX = assign list index (gotten from function 5F02H) 
  329.                ES:DI = Segment:Offset of buffer for returned string
  330. RETURNS:       if successful
  331.                         Carry Flag = Clear
  332.                                 CX = length of printer setup string
  333.                              ES:DI = Segment:Offset of buffer holding string
  334.                if unsuccessful
  335.                         Carry Flag = Set
  336.                                 AX = error code
  337.                                      1       if invalid function call
  338.  
  339.  
  340.  
  341.        <UP> - PRIOR PAGE          <F1> - PRIOR MENU           <ESC> TO QUIT$
  342. FUNCTION:      5FH      SUBFUNCTION 02   GET ASSIGN LIST ENTRY
  343.                         SUBFUNCTION 03   MAKE ASSIGN LIST ENTRY
  344.                         SUBFUNCTION 04   CANCEL ASSIGN LIST ENTRY
  345. DESCRIPTION:   Subfunction 02 returns information pertaining to a specified 
  346.                entry in the system assign list; this list associates device
  347.                names with network files, directories or printers; Microsoft 
  348.                Networks must be running to use this function.        
  349. CALL:          AH = 5FH
  350.                AL = 02
  351.                BX = assign list index
  352.                DS:SI = Segment:Offset of 16 byte buffer for local name
  353.                ES:DI = Segement:Offset of 128 byte buffer for remote name
  354. RETURNS:       if successful
  355.                         Carry Flag = Clear
  356.                BH = device status flag             BL = device type
  357.                   bit 0 = 0   if device valid           3   if printer
  358.                           1   if device invalid         4   if drive
  359.                CX = stored parameter
  360.                DS:SI = address of ASCIIZ local device name
  361.                ES:DI = address of ASCIIZ network name
  362.                if unsuccessful
  363.                         Carry Flag = Set
  364.                AX = error code
  365.                      1  if invalid function code     12H  if no more entries
  366.     ANY KEY FOR NEXT SUBFUNCTION     <F1> - PRIOR MENU        <ESC> TO QUIT@
  367. DESCRIPTION:   Subfunction 03 redirects a local device (printer or disk drive) 
  368.                to a network directory; Microsoft Networks must be running to 
  369.                use this function.     
  370.  
  371. CALL:          AH = 5FH
  372.                AL = 03
  373.                BL = device type
  374.                     3   if printer
  375.                     4   if drive
  376.                CX = parameter to save for caller
  377.                DS:SI = Segment:Offset of ASCIIZ local device name
  378.                ES:DI = Segment:Offset of ASCIIZ network name and ASCIIZ password
  379.  
  380. RETURNS:       if successful
  381.                         Carry Flag = Clear
  382.                if unsuccessful
  383.                         Carry Flag = Set
  384.                                 AX = error code
  385.                                      1     if invalid function code
  386.                                            if incorrect string format
  387.                                            if device already redirected
  388.                                      3     if path not found
  389.                                      5     if access denied
  390.                                      8     if insufficient memory
  391.  ANY KEY FOR MORE    <UP> - PRIOR PAGE     <F1> - PRIOR MENU      <ESC> TO QUIT@
  392.  
  393.  
  394. DESCRIPTION:   Subfunction 04 cancels a previous redirection by removing the 
  395.                association of the local device name from the network name; 
  396.                Microsoft Networks must be running to use this function.     
  397.  
  398. CALL:          AH = 5FH
  399.                AL = 04
  400.                DS:SI = Segment:Offset of ASCIIZ local device name
  401.                
  402. RETURNS:       if successful
  403.                         Carry Flag = Clear
  404.  
  405.                if unsuccessful
  406.                         Carry Flag = Set
  407.                                 AX = error code
  408.                                      1   if invalid function code
  409.                                          if no match found for ASCIIZ string
  410.                                    0FH   if device paused on server
  411.  
  412.  
  413.  
  414.        <UP> - PRIOR PAGE          <F1> - PRIOR MENU           <ESC> TO QUIT$
  415. FUNCTION:      2AH      GET SYSTEM DATE
  416.  
  417. DESCRIPTION:   Returns the current system date - year, month, day, day of week 
  418.                - expressed as binary numbers. 
  419.  
  420. CALL:          AH = 2AH
  421.  
  422. RETURNS:       CX = year  (1980 thru 2099)
  423.                DH = month (1 = January ... 12 = December)
  424.                DL = day (1 to 31)
  425.                AL = day of week (0 = Sunday, 6 = Saturday)$
  426. FUNCTION:      2BH      SET SYSTEM DATE
  427.  
  428. DESCRIPTION:   Sets the system date - year, month, day.
  429.  
  430. CALL:          AH = 2BH
  431.                CX = year  (1980 thru 2099)
  432.                DH = month (1 = January ... 12 = December)
  433.                DL = day (1 to 31)
  434.  
  435. RETURNS:       AL = 0         if successful
  436.                     0FFH      if invalid date$
  437. FUNCTION:      2CH      GET SYSTEM TIME
  438.  
  439. DESCRIPTION:   Returns the current system time - hours, minutes, seconds, 
  440.                hundredths - expressed as binary numbers.
  441.  
  442. CALL:          AH = 2CH
  443.  
  444. RETURNS:       CH = hours      (0 - 23)
  445.                CL = minutes    (0 - 59)
  446.                DH = seconds    (0 - 59)
  447.                DL = hundredths (0 - 99)$
  448. FUNCTION:      2DH      SET SYSTEM TIME
  449.  
  450. DESCRIPTION:   Sets the current system time - hours, minutes, seconds, 
  451.                hundredths.
  452.  
  453. CALL:          AH = 2DH
  454.                CH = hours      (0 - 23)
  455.                CL = minutes    (0 - 59)
  456.                DH = seconds    (0 - 59)
  457.                DL = hundredths (0 - 99)
  458.  
  459. RETURNS:       AL = 0      if successful
  460.                     0FF    if invalid time$
  461. FUNCTION:      00H      PROGRAM TERMINATE 
  462.  
  463. DESCRIPTION:   One of several methods to terminate a program; flushes all file 
  464.                buffers to disk; restores exit addresses; other methods of 
  465.                terminating a program are preferred.  
  466.  
  467. CALL:          AH = 0 
  468.                CS = PSP segment 
  469.  
  470. RETURNS:       Nothing 
  471.  
  472. SEE ALSO:      Functions 4CH and 31H$
  473. FUNCTION:      4CH      PROGRAM TERMINATE WITH RETURN CODE
  474.  
  475. DESCRIPTION:   Terminates a program returning control to a parent or COMMAND.
  476.                COM and passes back a return code; restores termination handler 
  477.                vector from PSP:000AH, restores Ctl-Break vector from 
  478.                PSP:000EH, restores critical error handler vector form PSP:0012H, 
  479.                flushes all buffers, closes all files with active handles and 
  480.                transfers to the termination handler address; parent can get 
  481.                return code by calling function 4DH; approved way to terminate 
  482.                a program.
  483.  
  484. CALL:          AH = 4CH
  485.                AL = return code
  486.  
  487. RETURNS:       nothing
  488.  
  489. SEE ALSO:      Function 00H, 31H$
  490. FUNCTION:      31H      PROGRAM TERMINATE AND STAY RESIDENT
  491.  
  492. DESCRIPTION:   Terminates the current program, but does not return all of its 
  493.                assigned memory to MS-DOS; control is passed back to 
  494.                COMMAND.COM; additional memory assigned thru a call to function 
  495.                48H is not affected; generally used by .COM programs, but with 
  496.                care can be called from .EXE programs; preferred to the use of 
  497.                INT 27H, unless early DOS compatability needed.
  498.  
  499. CALL:          AH = 31H
  500.                AL = return code
  501.                DX = memory size to reserve (number of 16 byte paragraphs)
  502.  
  503. RETURNS:       nothing
  504.  
  505. SEE ALSO:      INT 27H$
  506. FUNCTION:      14H      SEQUENTIAL READ - FCB
  507.  
  508. DESCRIPTION:   Reads the next sequential block of data from a file specified 
  509.                by an open file control block (FCB); writes the block to the 
  510.                disk transfer area (DTA); all information for the read - record 
  511.                size, location, etc. - is obtained from the FCB; updates the 
  512.                appropriate FCB fields. 
  513.  
  514. CALL:          AH = 14H
  515.                DS:DX = Segment:Offset of open FCB
  516.  
  517. RETURNS:       AL = 00  if successful
  518.                     01  if end of file encountered
  519.                     02  if record size will cause DTA segment wrap - canceled
  520.                     03  if partial record read at the end of the file
  521.  
  522. SEE ALSO:      Function 3FH$
  523. FUNCTION:      15H      SEQUENTIAL WRITE - FCB
  524.  
  525. DESCRIPTION:   Writes data from the disk transfer area (DTA) to the file 
  526.                specified by an open file control block (FCB); data is written 
  527.                to the file location determined by the current block and 
  528.                current record fields; updates the appropriate fields in the 
  529.                FCB. 
  530.  
  531. CALL:          AH = 15H
  532.                DS:DX = Segment:Offset of open FCB
  533.  
  534. RETURNS:       AL = 00  if successful
  535.                     01  if disk is full = canceled
  536.                     02  if record size will cause DTA segment wrap - canceled
  537.                
  538. SEE ALSO:      Function 40H$
  539. FUNCTION:      21H      RANDOM READ - FCB
  540.  
  541. DESCRIPTION:   Reads a record from a specific file into memory; the file is 
  542.                specified by an open file control block (FCB) and the specific 
  543.                record, by the random record field in that FCB; the record is 
  544.                read into the current disk transfer area (DTA); current block 
  545.                and current record fields in the FCB are updated, but the 
  546.                random record field is not changed. 
  547.  
  548. CALL:          AH = 21H
  549.                DS:DX = Segment:Offset of an open FCB
  550.  
  551. RETURNS:       AL = 00  if successful
  552.                     01  if end of file encountered
  553.                     02  if record size will cause DTA segment wrap - canceled
  554.                     03  if partial record read at the end of the file
  555.  
  556. SEE ALSO:      Function 3FH$
  557. FUNCTION:      22H      RANDOM WRITE - FCB
  558.  
  559. DESCRIPTION:   Writes data from the disk transfer area (DTA) to the file 
  560.                specified by an open file control block (FCB); data is written 
  561.                to the file location specified by the random record field in 
  562.                the FCB; current block and current record fields in the FCB are 
  563.                updated, but the random record field is not changed.
  564.                 
  565. CALL:          AH = 22H
  566.                DS:DX = Segment:Offset of an open FCB
  567.  
  568. RETURNS:       AL = 00  if successful
  569.                     01  if disk is full - canceled
  570.                     02  if record size will cause DTA segment wrap - canceled
  571.                
  572. SEE ALSO:      Function 40H$
  573. FUNCTION:      24H      SET RANDOM RECORD NUMBER - FCB
  574.  
  575. DESCRIPTION:   Sets the random record field of an open file control block 
  576.                (FCB) to correspond with the current block and current record 
  577.                fields of that FCB; use prior to making random read/write 
  578.                calls.
  579.  
  580. CALL:          AH = 24H
  581.                DS:DX = Segment:Offset of an open FCB
  582.  
  583. RETURNS:       Random record field of the FCB updated$
  584. FUNCTION:      27H      RANDOM BLOCK READ - FCB
  585.  
  586. DESCRIPTION:   Reads one or more sequential records from a specific file into 
  587.                memory at the current disk transfer area (DTA); file is 
  588.                specified by an open file control block (FCB); starting point 
  589.                of read is specified by the value in the random record number 
  590.                field in FCB; all pointers are updated by MS-DOS at the end of 
  591.                the read and are left pointing to the next record in the file.
  592.  
  593. CALL:          AH = 27H
  594.                CX = number of records to be read
  595.                DS:DX = Segment:Offset of open FCB
  596.  
  597. RETURNS:       AL = 00  if successful
  598.                     01  if end of file encountered
  599.                     02  if record size will cause DTA segment wrap - canceled
  600.                     03  if partial record read at the end of the file
  601.                CX = actual number of records read
  602.  
  603. SEE ALSO:      Function 21H 3FH$
  604. FUNCTION:      28H      RANDOM BLOCK WRITE - FCB
  605.  
  606. DESCRIPTION:   Writes one or more sequential records from the disk transfer 
  607.                area (DTA) to a file at a specific record number; file is 
  608.                specified by an open file control block (FCB); starting point 
  609.                of read is specified by the value in the random record number 
  610.                field in FCB; all pointers are updated by MS-DOS at the end of 
  611.                the read and are left pointing to the next record in the file; 
  612.                if call specifies that 0 record be written, MS-DOS extends or 
  613.                truncates the file to the length specified by the random record 
  614.                and record size field.
  615.  
  616. CALL:          AH = 28H
  617.                CX = number of records to write
  618.                DS:DX = Segment:Offset of open FCB
  619.  
  620. RETURNS:       AL = 00  if successful
  621.                     01  if disk full - canceled
  622.                     02  if record size will cause DTA segment wrap - canceled
  623.                CX = actual number of records written
  624.  
  625. SEE ALSO:      Function 22H 40H$
  626. FUNCTION:      3FH      READ FILE OR DEVICE - HANDLE
  627.  
  628. DESCRIPTION:   Reads from the file or device associated with a specified 
  629.                handle; if reading from a character device, such as the 
  630.                standard input (KBD), only one line (up to first carriage 
  631.                return), will be read; if call returns less bytes than 
  632.                specified, then a partial record was read at the end of a file.
  633.  
  634. CALL:          AH = 3FH
  635.                BX = handle
  636.                CX = number of bytes to read
  637.                DS:DX = Segment:Offset of buffer area to hold read
  638.  
  639. RETURNS:       if successful
  640.                         Carry Flag = Clear
  641.                                 AX = number of bytes actually read
  642.                                      0 indicates end of file
  643.                if unsuccessful
  644.                         Carry Flag = Set
  645.                                 AX = error code
  646.                                      5       if access denied
  647.                                      6       if invalid handle$
  648. FUNCTION:      40H      WRITE TO FILE OR DEVICE - HANDLE
  649.  
  650. DESCRIPTION:   Writes to the file or device associated with a specified 
  651.                handle; if call returns less bytes than specified, then an
  652.                error was encountered even though Carry Flag was not set; if 
  653.                call is made with 0 bytes specified to be written, then file 
  654.                size is extended or truncated to the value of the file pointer.
  655.  
  656. CALL:          AH = 40H
  657.                BX = handle
  658.                CX = number of bytes to write
  659.                DS:DX = Segment:Offset of buffer area to be written
  660.  
  661. RETURNS:       if successful
  662.                         Carry Flag = Clear
  663.                                 AX = number of bytes actually written
  664.                                      0 indicates full disk
  665.                if unsuccessful
  666.                         Carry Flag = Set
  667.                                 AX = error code
  668.                                      5       if access denied
  669.                                      6       if invalid handle$
  670. FUNCTION:      42H      MOVE FILE POINTER - HANDLE
  671.  
  672. DESCRIPTION:   Sets the file pointer to a specific file location relative to: 
  673.                1) the start of the file, 2) the end of the file or, 3) the 
  674.                current location; the next file read or write will begin at 
  675.                that location; care must be exercised not to set the pointer to 
  676.                a location before the start or after the end of the file; file 
  677.                size can be determined by using method 2 with a relative 
  678.                location of 0 and examining the returned pointer.
  679.  
  680. CALL:          AH = 42H
  681.                AL = method code
  682.                     0 to set the byte offset relative to the start of the file
  683.                     1 to set the byte offset relative to the current location
  684.                     2 to set the byte offset relative to the end of the file
  685.                BX = handle
  686.                CX = most significant half of offset
  687.                DX = least significant half of offset
  688.  
  689.  
  690.   ANY KEY FOR MORE             <F1> - PRIOR MENU                 <ESC> TO EXIT@
  691.  
  692. RETURNS:       if successful
  693.                         Carry Flag = Clear
  694.                                 DX = most significant half of new pointer
  695.                                 AX = least significant half of new pointer
  696.                                      (new pointer always relative to start
  697.                                      of file)
  698.                if unsuccessful
  699.                         Carry Flag = Set
  700.                                 AX = error code
  701.                                      1        if invalid function number
  702.                                      6        if invalid handle
  703.  
  704.  
  705.        <UP> - PRIOR PAGE          <F1> - PRIOR MENU           <ESC> TO QUIT$
  706.  
  707. FUNCTION:      5CH      RECORD LOCKING - HANDLE
  708.  
  709. DESCRIPTION:   Locks or unlocks a specified region of a file in a networking 
  710.                or multitasking environment; locked regions cannot be read or 
  711.                written to; regions must be unlocked prior to termination of the 
  712.                process; all byte offsets are relative to the start of a file; 
  713.                the unlock function must use the same offset and length 
  714.                parameters used in the lock function; requests to access locked 
  715.                regions generate an INT 24H (critical error) for the requesting 
  716.                process.
  717.  
  718. CALL:          AH = 5CH
  719.                AL = function code
  720.                     00   to lock
  721.                     01   to unlock
  722.                BX = handle
  723.                CX = most significant half of offset of region
  724.                DX = least significant half of offset of region
  725.                SI = most significant half of region length
  726.                DI = least significant half of region length
  727.  
  728.  
  729.   ANY KEY FOR MORE             <F1> - PRIOR MENU                 <ESC> TO EXIT@
  730.  
  731.  
  732. RETURNS:       if successful
  733.                         Carry Flag = Clear
  734.                if unsuccessful
  735.                         Carry Flag = Set
  736.                                 AX = error code
  737.                                   1       if invalid function code
  738.                                   6       if invalid handle
  739.                                 21H       if all/part of region already locked
  740.  
  741.  
  742.        <UP> - PRIOR PAGE          <F1> - PRIOR MENU           <ESC> TO QUIT$
  743.  
  744. INTERRUPT:     20H      PROGRAM TERMINATE
  745.  
  746. DESCRIPTION:   Terminates currently operating program and returns control to 
  747.                its parent; closes all files and flushes buffers; cannot be 
  748.                used with .EXE programs; supeseded by INT 21H, function 4CH. 
  749.  
  750. CALL:          CS = segment of program segment prefix
  751.  
  752. RETURNS:       Nothing
  753.  
  754. SEE ALSO:      INT 21H  - Function 4CH$
  755. INTERRUPT:     25H      ABSOLUTE DISK READ
  756.  
  757. DESCRIPTION:   Provides direct linkage to MS-DOS BIOS module to read data 
  758.                directly from a specific disk sector into a specified memory 
  759.                location;  will destroy all registers except the segment 
  760.                registers; the stack should be cleared upon return from this 
  761.                call as the flags PUSHed before the call, are still there; care 
  762.                must be taken to insure that the parameters are correct 
  763.                since there is very little checking done by the routine; using 
  764.                this interrupt should be avoided if at all possible; use INT 
  765.                21H functions preferentially.
  766.  
  767. CALL:          AL = drive number (0 = A, 1 = B, etc.)
  768.                CX = number of sectors to read
  769.                DX = starting relative sector number
  770.                DS:BX = Segment:Offset of disk transfer area (DTA)@
  771.  
  772. RETURNS:       if successful
  773.                         Carry Flag = Clear
  774.                if unsuccessful
  775.                         Carry Flag = Set
  776.                                 AX = error code
  777.                                      80H  if attachment failed to respond
  778.                                      40H  if seek operation failed
  779.                                      20H  if controller failed
  780.                                      10H  if data error (CRC error)
  781.                                      08H  if direct memory access (DMA) failure
  782.                                      04H  if requested sector not found
  783.                                      03H  if write-protect fault
  784.                                      02H  if bad address mark
  785.                                      01H  if bad command$
  786. INTERRUPT:     26H      ABSOLUTE DISK WRITE
  787.  
  788. DESCRIPTION:   Provides direct linkage to MS-DOS BIOS module to write data 
  789.                from a specified memory location directly to a specific disk 
  790.                sector;  will destroy all registers except the segment 
  791.                registers; the stack should be cleared upon return from this 
  792.                call as the flags PUSHed before the call, are still there; care 
  793.                must be taken to insure that the parameters are correct 
  794.                since there is very little checking done by the routine; using 
  795.                this interrupt should be avoided if at all possible; use INT 
  796.                21H functions preferentially.
  797.  
  798. CALL:          AL = drive number (0 = A, 1 = B, etc.)
  799.                CX = number of sectors to read
  800.                DX = starting relative sector number
  801.                DS:BX = Segment:Offset of disk transfer area (DTA)@
  802.  
  803. RETURNS:       if successful
  804.                         Carry Flag = Clear
  805.                if unsuccessful
  806.                         Carry Flag = Set
  807.                                 AX = error code
  808.                                      80H  if attachment failed to respond
  809.                                      40H  if seek operation failed
  810.                                      20H  if controller failed
  811.                                      10H  if data error (CRC error)
  812.                                      08H  if direct memory access (DMA) failure
  813.                                      04H  if requested sector not found
  814.                                      03H  if write-protect fault
  815.                                      02H  if bad address mark
  816.                                      01H  if bad command$
  817. INTERRUPT:     27H      TERMINATE AND STAY RESIDENT
  818.  
  819. DESCRIPTION:   Terminates current program, but does not return all its 
  820.                originally allocated memory to MS-DOS; this prevents it from 
  821.                being overlaid by the next transient program loaded; upon 
  822.                termination, control is returned to its parent, generally 
  823.                COMMAND.COM; maximum amount of memory that can be reserved is 
  824.                with a value of 0FFF0H in DX - requests for more than this will 
  825.                result in only 32K being allocated; open files are NOT closed 
  826.                by this call; superseded by INT 21H, function 31H. 
  827.  
  828. CALL:          DX = offset of last byte of program's code to be protected + 1
  829.                CS = segment of program segment prefix
  830.  
  831. RETURNS:       Nothing
  832.  
  833. SEE ALSO:      INT 21H, Function 31H$
  834.  
  835. FUNCTION:      18H      UNKNOWN                                        
  836.  
  837. DESCRIPTION:                                                              
  838.                                                                             
  839. CALL:                            
  840.                                 
  841.                                      
  842.                                    
  843. RETURNS:                              
  844.                                                 
  845.                                                 
  846.                                                     $
  847. FUNCTION:      1DH      UNKNOWN                                        
  848.  
  849. DESCRIPTION:                                                              
  850.                                                                             
  851. CALL:                            
  852.                                 
  853.                                      
  854.                                    
  855. RETURNS:                              
  856.                                                 
  857.                                                 
  858.                                                     $
  859. FUNCTION:      1EH      UNKNOWN                                        
  860.  
  861. DESCRIPTION:                                                              
  862.                                                                             
  863. CALL:                            
  864.                                 
  865.                                      
  866.                                    
  867. RETURNS:                              
  868.                                                 
  869.                                                 
  870.                                                     $
  871. FUNCTION:      1FH      UNKNOWN                                        
  872.  
  873. DESCRIPTION:                                                              
  874.                                                                             
  875. CALL:                            
  876.                                 
  877.                                      
  878.                                    
  879. RETURNS:                              
  880.                                                 
  881.                                                 
  882.                                                     $
  883. FUNCTION:      20H      UNKNOWN                                          
  884.  
  885. DESCRIPTION:                                                              
  886.                                                                             
  887. CALL:                            
  888.                                 
  889.                                      
  890.                                    
  891. RETURNS:                              
  892.                                                 
  893.                                                 
  894.                                                     $
  895. FUNCTION:      32H      GET DRIVE TABLE (Undocumented)                 
  896.  
  897. DESCRIPTION:   Returns Segment:Offset of drive parameter table; if for    
  898.                a floppy, drive must be accessed before using this function. 
  899. CALL:          AH = 32H          
  900.                DX = Drive #     
  901.                     (A = 1)          
  902.                                    
  903. RETURNS:       DS:BX = Segment:Offset 
  904.                        of drive table           
  905.                If AL = 0FFH, not found          
  906.                                                     $
  907. FUNCTION:      34H      GET DOS BUSY FLAG   (Undocumented)
  908.  
  909. DESCRIPTION:   Returns the Segment:Offset of the DOS Busy Flag; this flag is 
  910.                used internally by DOS to indicate that a DOS routine is 
  911.                currently active; if this flag is clear, then it is safe to 
  912.                initiate a service call; commonly used by TSRs to determine 
  913.                when they can pop up.
  914.  
  915. CALL:          AH = 34H
  916.  
  917. RETURNS:       ES:BX = Segment:Offset of DOS Busy Flag$
  918. FUNCTION:      37H      GET OR SET SWITCHAR    (Undocumented)
  919.  
  920. DESCRIPTION:   The switchar is the character recognized by DOS as preceeding a 
  921.                command line parameter (the '/', by default); this function 
  922.                returns the current switchar or permits a different one to be 
  923.                set; there are other subfunctions whose use is not known.
  924.                                                                             
  925. CALL:          AH = 34H
  926.                DL = 00H     to return current switchar
  927.                DL = 01H     to set a new switchar    
  928.                                    
  929. RETURNS:       if switchar requested
  930.                         DL = switchar$
  931. FUNCTION:      50H      SET NEW PSP SEGMENT    (Undocumented)
  932.                          
  933. DESCRIPTION:   Apparently, changes the segment address of the current program 
  934.                segment prefix.
  935.  
  936. CALL:          AH = 50H
  937.                BX = segment of new program segment prefix
  938.                                    
  939. RETURNS:       ?$
  940. FUNCTION:      51H      GET CURRENT PROGRAM SEGMENT PREFIX (Undocumented) 
  941.  
  942. DESCRIPTION:   Returns the segment address of the current program segment 
  943.                prefix
  944.                                                                             
  945. CALL:          AH = 51H
  946.                                    
  947. RETURNS:       BX = Segment of current program segment prefix$
  948. FUNCTION:      52H      GET FIRST MEMORY CONTROL BLOCK   (Undocumented)
  949.  
  950. DESCRIPTION:   Returns a pointer which is one word past the segment address of 
  951.                the first memory control block (MCB) in DOS's linked list.
  952.                Also, ES:[BX] is a pointer to drive A information table.     
  953. CALL:          AH = 52H                  
  954.                                    
  955. RETURNS:       ES:[BX-2] = Segment of first MCB$
  956. FUNCTION:      53H      UNKNOWN                                        
  957.  
  958. DESCRIPTION:                                                              
  959.                                                                             
  960. CALL:                            
  961.                                 
  962.                                      
  963.                                    
  964. RETURNS:                              
  965.                                                 
  966.                                                 
  967.                                                     $
  968. FUNCTION:      55H      CREATE A NEW PROGRAM SEGMENT PREFIX (Undocumented)
  969.  
  970. DESCRIPTION:   Creates a new program segment prefix (PSP) at a specified 
  971.                segment address; apparently, that PSP becomes the PSP 
  972.                recognized by DOS as current; assumed that memory has already
  973.                been allocated by call to proper INT 21H function.
  974.                                                                             
  975. CALL:          AH = 55H
  976.                DX = Segment address for new PSP          
  977.                                    
  978. RETURNS:       ?$
  979. FUNCTION:      5DH      UNKNOWN                                        
  980.  
  981. DESCRIPTION:                                                              
  982.                                                                             
  983. CALL:                            
  984.                                 
  985.                                      
  986.                                    
  987. RETURNS:                              
  988.                                                 
  989.                                                 
  990.                                                     $
  991. FUNCTION:      60H      UNKNOWN                                        
  992.  
  993. DESCRIPTION:                                                              
  994.                                                                             
  995. CALL:                            
  996.                                 
  997.                                      
  998.                                    
  999. RETURNS:                              
  1000.                                                 
  1001.                                                 
  1002.                                                     $
  1003. FUNCTION:      61H      UNKNOWN                                        
  1004.  
  1005. DESCRIPTION:                                                              
  1006.                                                                             
  1007. CALL:                            
  1008.                                 
  1009.                                      
  1010.                                    
  1011. RETURNS:                              
  1012.                                                 
  1013.                                                 
  1014.                                                     $
  1015. INTERRUPT:     28H      INTERNAL VECTOR   (Undocumented)
  1016.  
  1017. DESCRIPTION:   Generated by DOS during the execution of a prolonged function 
  1018.                like 0AH (Buffered Input); during this interrupt, calls to DOS 
  1019.                functions higher than 0CH can be made without worrying about 
  1020.                re-entrancy problems; this can be used by a resident program to 
  1021.                allow it to call disk handling functions; similarly, a resident 
  1022.                program awaiting a keystroke can issue this interrupt to allow
  1023.                other resident programs access to DOS.
  1024.  
  1025. CALL:          Nothing$
  1026.